package com.lakeworks.service.impl;


import com.lakeworks.common.core.text.Convert;
import com.lakeworks.common.domain.ticket.TktHistory;
import com.lakeworks.mapper.TktHistoryMapper;
import com.lakeworks.service.ITktHistoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 工单历史Service业务层处理
 *
 * @author lake
 * @date 2023-07-17
 */
@Service
public class TktHistoryServiceImpl implements ITktHistoryService {
    @Autowired
    private TktHistoryMapper tktHistoryMapper;

    /**
     * 查询工单历史
     *
     * @param id 工单历史主键
     * @return 工单历史
     */
    @Override
    public TktHistory selectTktHistoryById(Long id) {
        return tktHistoryMapper.selectTktHistoryById(id);
    }

    /**
     * 查询工单历史列表
     *
     * @param tktHistory 工单历史
     * @return 工单历史
     */
    @Override
    public List<TktHistory> selectTktHistoryList(TktHistory tktHistory) {
        return tktHistoryMapper.selectTktHistoryList(tktHistory);
    }

    /**
     * 新增工单历史
     *
     * @param tktHistory 工单历史
     * @return 结果
     */
    @Override
    public int insertTktHistory(TktHistory tktHistory) {
        return tktHistoryMapper.insertTktHistory(tktHistory);
    }

    /**
     * 修改工单历史
     *
     * @param tktHistory 工单历史
     * @return 结果
     */
    @Override
    public int updateTktHistory(TktHistory tktHistory) {
        return tktHistoryMapper.updateTktHistory(tktHistory);
    }

    /**
     * 批量删除工单历史
     *
     * @param ids 需要删除的工单历史主键
     * @return 结果
     */
    @Override
    public int deleteTktHistoryByIds(String ids) {
        return tktHistoryMapper.deleteTktHistoryByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除工单历史信息
     *
     * @param id 工单历史主键
     * @return 结果
     */
    @Override
    public int deleteTktHistoryById(Long id) {
        return tktHistoryMapper.deleteTktHistoryById(id);
    }
}
